<?$roll = cartoon_util_interface::cacheGetRoll();
if($roll){
	$img = $link = '';	
	for ($i=0;$i<count($roll);$i++){
		$img.="<div id=\"top_img_$i\" style=\"position: absolute; visibility: visible\">
          <a title=\"".$roll[$i]['title']."\" target=\"_blank\" href=\"".$roll[$i]['link']."\" class=\"coin-slides\">
            <img  width=\"664\" height=\"150\" src=\"".$roll[$i]['img_url']."\">
            <h3 id=\"top_tl_$i\">".$roll[$i]['title']."</h3>
          </a>
        </div>";
		$link.=	"<a href=\"".$roll[$i]['link']."\" class=\"".($i==0?'current':'')."\" id=\"top_od_$i\"></a>"	;
	}
}
?>
<?if($roll):?>
<div class="wc_slider">
	<div class="images" id="images">
		<?=$img?>
     </div>
      <div class="slidetabs">
      	<?=$link?>
      </div>
</div>
<script type="text/javascript" src="<?= $_SERVER['config']['style']?>/js/essential.js"></script>
    <script type="text/javascript">
		var roller = new ImageRoller({
			images: ['top_img_0', 'top_img_1', 'top_img_2', 'top_img_3'],
			EnterArtical: '',
			frame: 'images',
			interval: .5,
			preTipId: '',
			nextTipId: '',
			links: ['top_od_0', 'top_od_1', 'top_od_2', 'top_od_3'],
			titles: ['top_tl_0', 'top_tl_1', 'top_tl_2', 'top_tl_3'],
			description: ['top_tl_0', 'top_tl_1', 'top_tl_2', 'top_tl_3']
		});
	</script>
	<?endif;?>